﻿@inherits BaseComponent

<Breadcrumb Style="margin:16px 0;">
    <BreadcrumbItem OnClick="OnHome">
        <Icon Type="home" Style="cursor:pointer;" />
        <span style="cursor:pointer;">@Language.Home</span>
    </BreadcrumbItem>
    @if (CurrentMenu.Parent != null)
    {
        var parentName = Language.GetString(CurrentMenu.Parent);
        <BreadcrumbItem>
            <Icon Type="@CurrentMenu.Parent.Icon" />
            <span>@parentName</span>
        </BreadcrumbItem>
    }
    @if (CurrentMenu.Name != "Home")
    {
        var menuName = Language.GetString(CurrentMenu);
        <BreadcrumbItem>
            <Icon Type="@CurrentMenu.Icon" />
            <span>@menuName</span>
        </BreadcrumbItem>
    }
</Breadcrumb>

@code {
    [Parameter] public Known.MenuItem CurrentMenu { get; set; }
    [Parameter] public Action OnHome { get; set; }
}